Scanning device and host computer connected to the same

ABSTRACT

A scanning device reads image data, stores the image data in a unit of raster in a buffer and transferring the image data to a host computer. The scanning device has a stop unit to temporarily stop reading the image data when an empty capacity of the buffer becomes smaller than a predetermined amount, a write unit to write specified mark data in a next storage line of raster image data lastly read and stored in the buffer in response to a temporary stop, and a restart unit to restart reading the image data by overlapping the raster image data lastly read when the empty capacity of the buffer becomes larger than the predetermined amount.

TECHNICAL FIELD

This invention relates to a scanning device and a host computerconnected to the scanning device, and more particularly to a scanningdevice for reading image data, storing data in a unit of raster into abuffer and transferring data to a host computer, in which image data isread at high accuracy with a simple structure even when a readingoperation is stopped temporarily in terms of a buffer capacity, and ahost computer connected to the scanning device.

BACKGROUND ART

The scanning device comprises an interface buffer (memory) fortemporarily storing read image data and transmits the read image data tothe host apparatus (host computer). In this case, because control ispassed to another job having higher priority to be expanded in the hostcomputer, the image data is received with a time lag by the hostcomputer so that an empty area of the interface buffer is possiblyreduced.

Thus, the scanning device performs a start/stop operation. That is, thescanning device stops temporarily reading the image data, if thecapacity of interface buffer falls below a predetermined amount, andrestarts reading the image data, if the empty area of interface bufferis restored to the predetermined amount or more owing to its temporarystop. When this start/stop operation is performed, it is required toconcatenate the image data.

Conventionally, the scanning device performs the following processing toconcatenate the image data. That is, it is recorded to which rasterposition the image data is read and stored in the interface bufferbefore the stop operation is performed. And if the restart operation forreading is entered, a carrier (an optical unit mounting a read head) isreturned by a specified amount, and is set at a constant speed bythrough up, whereby reading the image data is restarted. If the recordedraster position is reached, the raster image data is stored in theinterface buffer from the next position. Thereby, a concatenation of theimage data required at the time of the start/stop operation isperformed. Though not described above, when the stop operation forreading is entered, the carrier is stopped by through down.

However, since the carrier is moved by employing a gear or a belt, whenthe start/stop operation is performed, a certain amount of backlashinevitably occurs in through up after returning the carrier by aspecified amount. Moreover, hunting (vibration) by through up alsoinevitably occurs. Therefore, the conventional scanning device has aproblem that the image data cannot be concatenated at high accuracy.

In order to solve this problem, it is necessary to move the carrieremploying a feed mechanism of high precision with a quite small amountof backlash. However, there is an associated problem that the scanningdevice cost is increased impractically.

The present invention has been achieved in the light of theabove-mentioned problems, and it is an object of the present inventionto provide a scanning device that can read the image data at highaccuracy with a simple structure even when the reading operation istemporarily stopped in terms of buffer capacity.

Also, it is another object of the present invention to provide a hostcomputer connected to the scanning device that can read the image dataat high accuracy with a simple structure even when the reading operationis temporarily stopped in terms of buffer capacity.

DISCLOSURE OF INVENTION

The present invention provides a scanning device for reading image data,storing the image data in a unit of raster in a buffer and transferringthe image data to a host computer. The scanning device has means fortemporarily stopping reading the image data when an empty capacity ofthe buffer is smaller than a predetermined amount, means for writing thespecified mark data in a next storage line of the raster image datalastly read and stored in the buffer in response to the temporary stop,and means for restarting reading the image data by overlapping theraster image data lastly read when the empty capacity of the buffer islarger than the predetermined amount.

Also, the present invention provides a host computer connected to thescanning device for acquiring the image data read by the scanning devicein a unit of raster. The host computer has means for determining whetheror not the acquired raster image data is specified mark data indicatinga temporary stop of reading the image data, means for detecting theraster image data most similar to the raster image data immediatelybefore the mark data for a detection object of the raster image datahaving a predetermined number of rasters following the mark data withinthe acquired image data, and means for concatenating the image data readbefore the temporary stop and the image data read after the temporarystop on the basis of the detected raster image data and the raster imagedata immediately before the mark data.

In the present invention as configured above, the mark data is employed.That is, when the empty capacity of the buffer becomes smaller than thepredetermined amount, reading the image data is temporarily stopped, andthe specified mark data is written in the next storage line of theraster image data lastly read and stored in the buffer. And when theempty capacity of the buffer becomes larger than the predeterminedamount owing to the temporary stop, reading the image data is restartedby overlapping the raster image data lastly read.

On the other hand, the host computer acquires the image data stored inthis buffer, and, detects the raster image data most similar to theraster image data immediately before the mark data for a detectionobject of the raster image data having a predetermined number of rastersfollowing the mark data within the acquired image data, if the mark datais detected in the acquired image data. And the host computerconcatenates the image data read before the temporary stop and the imagedata read after the temporary stop on the basis of the detected rasterimage data and the raster image data immediately before the mark data.

In this manner, with the present invention, in performing the start/stopoperation for reading the image data in accordance with the capacity ofbuffer, the scanning device restarts reading the image data byoverlapping the raster image data lastly read at the time of temporarystop, while the host computer designates the raster image data lastlyread at the time of temporary stop employing the mark data recorded bythe scanning device, detects the raster image data matched with theraster image data lastly read, and concatenates the image data beforetemporary stop and the image data after temporary stop, whereby theimage data can be read at high accuracy with a simple structure.

Preferably, the host computer of the present invention further has meansfor determining whether or not the neighborhood of the raster image dataimmediately before the mark data is the uniform image data. And, theraster image data is concatenated without detection, when theneighborhood of the raster image data immediately before the mark datais the uniform image data. Thereby, the processing load can be relievedwhen there is no need for concatenating the image data fully.

Also, preferably, the host computer of the present invention further hasmeans for calculating a weighted average of the raster image data to beconcatenated, the raster image data to concatenate and the followingraster image data having a predetermined number of rasters in accordancewith a separation degree of raster, and for rewriting the raster imagedata to concatenate and the following raster image data of thepredetermined number of rasters on the basis of its calculation result.Thereby, the image data can be smoothly concatenated by using the signalprocessing.

The present invention provides a scanning device for reading image data,storing the image data in a unit of raster and transferring the imagedata to a host computer. The scanning device has means for temporarilystopping reading the image data when an empty capacity of the buffer issmaller than a predetermined amount, means for notifying the hostcomputer of the information capable of designating the raster positionof the raster image data lastly read and stored in the buffer inresponse to the temporary stop, and means for restarting reading theimage data by overlapping the raster image data lastly read when theempty capacity of the buffer is larger than the predetermined amount.

On the other hand, the present invention provides a host computerconnected to a scanning device for acquiring the image data read by thescanning device in a unit of raster. The host computer has means foracquiring the raster position information indicating a temporary stopposition of reading the image data from the scanning device, means fordesignating the raster image data lastly read at the time of thetemporary stop indicated by the raster position information from theacquired image data, means for detecting the raster image data mostsimilar to the raster image data lastly read for a detection object ofthe raster image data having a predetermined number of rasters followingthe raster image data lastly read within the acquired image data, andmeans for concatenating the image data read before the temporary stopand the image data read after the temporary stop on the basis of thedetected raster image data and the raster image data lastly read.

In the present invention as configured above, no mark data is employed.That is, when the empty capacity of the buffer is smaller than thepredetermined amount, the scanning device temporarily stops reading theimage data, and notifies the host computer of the information capable ofdesignating the raster position of the raster image data lastly read andstored in the buffer. And the scanning device restarts reading the imagedata by overlapping the raster image data lastly read when the emptycapacity of the buffer is larger than the predetermined amount owing tothe temporary stop.

On the other hand, in acquiring the image data stored in the buffer, thehost computer acquires the raster position information indicating atemporary stop position of reading the image data from the scanningdevice, designates the raster image data lastly read at the time of thetemporary stop indicated by the raster position information from theacquired image data, and detects the raster image data most similar tothe raster image data lastly read for a detection object of the rasterimage data having a predetermined number of rasters following the rasterimage data lastly read within the acquired image data. And the hostcomputer concatenates the image data read before the temporary stop andthe image data read after the temporary stop on the basis of thedetected raster image data and the raster image data lastly read.

In this manner, with the present invention, in performing the start/stopoperation for reading the image data in accordance with the capacity ofbuffer, the scanning device restarts reading the image data byoverlapping the raster image data lastly read at the time of temporarystop, while the host computer designates the raster image data lastlyread by employing the information capable of designating the rasterposition of the raster image data lastly read at the time of temporarystop notified by the scanning device, detects the raster image datamatched with the raster image data lastly read, and concatenates theimage data before temporary stop and the image data after temporarystop, whereby the image data can be read at high accuracy with a simplestructure.

Preferably, the host computer of the present invention furtherdetermines whether or not the neighborhood of the raster image datalastly read at the time of temporary stop is the uniform image data, andconcatenates the raster image data without detection, when theneighborhood of the raster image data lastly read is the uniform imagedata. Thereby, the processing load can be relieved when there is no needfor concatenating the image data fully.

Also, preferably, the host computer of the present invention calculatesa weighted average of the raster image data to be concatenated, theraster image data to concatenate and the following raster image datahaving a predetermined number of rasters in accordance with a separationdegree of raster, and rewrites the raster image data to concatenate andthe following raster image data having a predetermined number of rasterson the basis of its calculation result. Thereby, the image data can besmoothly concatenated by using the signal processing.

The present invention provides a scanning device for reading image data,storing the image data in a unit of raster in a buffer and transferringthe image data to a host computer. The scanning device has means fortemporarily stopping reading the image data when an empty capacity ofthe buffer is smaller than a predetermined amount, means for restartingreading the image data by overlapping the raster image data lastly readat the time of the temporary stop when the empty capacity of the bufferis larger than the predetermined amount, means for detecting the rasterimage data most similar to the raster image data lastly read for adetection object of the raster image data having a predetermined numberof rasters following the raster image data lastly read in response tothe restart, and means for concatenating the image data read before thetemporary stop and the image data read after the temporary stop inaccordance with the detected raster image data and the raster image datalastly read.

In the present invention as configured above, all can be realized by thescanning device. That is, when the empty capacity of the buffer becomessmaller than the predetermined amount, the scanning device temporarilystops reading the image data. In this case, it is managed where theraster image data lastly read is stored in the buffer in accordance witha normal buffer format control. And the scanning device restarts readingthe image data by overlapping the raster image data lastly read at thetime of the temporary stop when the empty capacity of the buffer becomeslarger than the predetermined amount.

Then, the scanning device detects the raster image data most similar tothe raster image data lastly read for a detection object of the rasterimage data having a predetermined number of rasters following the rasterimage data lastly read in response to the restart of reading the imagedata. And the scanning device concatenates the image data read beforethe temporary stop and the image data read after the temporary stop inaccordance with the detected raster image data and the raster image datalastly read.

In this manner, with the present invention, in performing the start/stopoperation for reading the image data in accordance with the capacity ofbuffer, the scanning device restarts reading the image data byoverlapping the raster image data lastly read at the time of temporarystop, detects the raster image data matched with the raster image datalastly read, and concatenates the image data before temporary stop andthe image data after temporary stop, whereby the image data can be readat high accuracy with a simple constitution.

Preferably, the scanning device of the present invention furtherdetermines whether or not the neighborhood of the raster image datalastly read at the time of temporary stop is the uniform image data.And, the raster image data is concatenated without detection, when theneighborhood of the raster image data lastly read is the uniform imagedata. Thereby, the processing load can be relieved when there is no needfor concatenating the raster image data fully.

Also, preferably, the host computer of the present invention calculatesa weighted average of the raster image data to be concatenated, theraster image data to concatenate and the following raster image datahaving a predetermined number of rasters in accordance with a separationdegree of raster, and rewrites the raster image data to concatenate andthe following raster image data having a predetermined number of rasterson the basis of its calculation result. Thereby, the image data can besmoothly concatenated by using the signal processing.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram showing a system structure of an imagereading system to which the present invention is applied.

FIG. 2 is one embodiment of structure provided for a scanning device.

FIG. 3 is one embodiment of structure provided for a host computer.

FIG. 4 is one embodiment of a flowchart of a process performed by thescanning device.

FIG. 5 is one embodiment of a flowchart of a process performed by thehost computer.

FIG. 6 is one embodiment of a flowchart of a process performed by thehost computer.

FIG. 7 is an explanatory diagram of image data stored in a ring buffer.

FIG. 8 is an explanatory diagram of a detection process for referenceraster image data.

FIG. 9 is an explanatory diagram of a weighted average process forraster image data.

FIG. 10 is another embodiment of the present invention.

FIG. 11 is another embodiment of the present invention.

FIG. 12 is an explanatory diagram of a circuit structure of differentialsum calculating means.

FIG. 13 is an explanatory diagram of a process of inflection pointdetecting means.

FIG. 14 is another embodiment of a flowchart of a process performed bythe scanning device.

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 1 schematically shows a system structure of an image reading systemto which the present invention is applied.

The image reading system of the present invention is composed of ascanning device 1 and a host apparatus (host computer) 2. The scanningdevice 1 reads the image data drawn on a manuscript 100 through anoptical unit 101, stores it in a unit of raster in a buffer andtransmits it to a host computer 2. In this case, the scanning device 1controls the optical unit 101 or the start and stop of a carrier, asindicated by an arrow A. That is, the scanning device 1 temporarilystops reading the image data, when the empty capacity of buffer issmaller than a predetermined amount, and in response to the temporarystop, restarts reading the image data, when the empty capacity of bufferis greater than the predetermined amount.

FIG. 2 is one embodiment of structure provided for the scanning device1, and FIG. 3 is one embodiment of structure provided for a hostcomputer 2.

In the scanning device 1 as shown in FIG. 2, an image reading unit 10reads image data of the manuscript 100 laid on a manuscript plane bymoving the carrier (not shown) mounting a read head. The carriercomprises the optical unit 101 represented in FIG. 1. A carrier driveunit 11 controls the movement of the carrier, comprising a motor 111 anda belt 112. A ring buffer 12 temporarily stores the image data read bythe image reading unit 10. Image writing unit 13 writes the image dataread by the image reading unit 10 into the ring buffer 12, and updates awrite pointer WP pointing to a storage location in synchronism with itswriting. Data transfer control unit 14 reads the image data stored inthe ring buffer 12 and sends it to the host computer 2 in response to adata transfer request from the host computer 2, and synchronously withthe reading, updates a read pointer RP pointing to a read location.Buffer monitor unit 15 monitors the write pointer WP and the readpointer RP to monitor the capacity of empty area in the ring buffer 12,and issues an instruction of start and stop control (temporary stopcontrol and restart control of reading the image data) in response.Start and stop control unit 16 performs the start and stop control bycontrolling the carrier drive unit 11 in response to a start and stopcontrol instruction issued by the buffer monitor unit 15. Mark datawriting unit 17 writes the specified mark data in a write area (at araster position pointed to by the raster pointer WP) of the image datafor the ring buffer 12, when the start and stop control unit 16 issues atemporary stop instruction of reading the image data.

On the other hand, in the host computer 2 as shown in FIG. 3, datatransfer control unit 20 acquires the image data read by the scanningdevice 11. A buffer 21 temporarily stores the image data acquired by thedata transfer control unit 20. A disk (hard disk) 22 stores the imagedata acquired by the data transfer control unit 20. Image writing unit23 writes the image data stored in the buffer 21 into the disk 22.

Referring to the flowcharts of FIGS. 4 to 6, the operation of thepresent invention will be described below in detail. FIG. 4 is oneembodiment of a flowchart of a process performed by the scanning device1, and FIGS. 5 and 6 are one embodiment of flowcharts of a processperformed by the image writing unit 23 provided for the host computer 2.

Referring to the flowchart of FIG. 4, firstly, the process performed bythe scanning device 1 will be described below.

If a read request of image data is issued, first of all, the scanningdevice 1 starts to read the image data at step ST11, and then determineswhether or not reading the image data is ended at step ST12.

If reading the image data is not ended, the scanning device 1 goes tostep ST13 to determine whether or not the capacity of empty area in thering buffer 12 is less than a predetermined amount by monitoring a writepointer WP and a read pointer RP. That is, the capacity of empty area inthe ring buffer 12 is decreased, when the data receiving rate (boostspeed) of the host computer 2 is slower than the reading speed of imagedata, whereby the scanning device 1 monitors it.

If the capacity of empty area in the ring buffer 12 is not less than thepredetermined amount at step ST13 for determination, the scanning device1 returns to step ST12 to continue reading the image data.

On the other hand, if the capacity of empty area in the ring buffer 12is less than the predetermined amount at step ST13 for determination,the scanning device 1 proceeds to step ST14, where the carrier is oncestopped to stop reading the image data and record the specified markdata (taking no value as the image data) in the ring buffer 12.

Subsequently, the scanning device 1 once moves back the carrier by aspecified amount at step ST15. Then, at step ST16, the operation waitsfor the capacity of empty area in the ring buffer 12 to be greater thanor equal to a predetermined amount by monitoring the write pointer WPand the read pointer RP. That is, when the image data stored in the ringbuffer 12 is transmitted to the host computer 2, the capacity of emptyarea in the ring buffer 12 is increased, whereby the scanning device 1waits for it.

At step ST16 for determination, if the capacity of empty area in thering buffer 12 is greater than or equal to the predetermined amount, thescanning device 1 proceeds to step ST17, where the carrier is movedforward, and reading the image data is restarted from a positionimmediately before a position at which reading is stopped previously.Then, the operation returns to step ST12. That is, reading the imagedata is restarted to overlap the image data. In this case, the size ofoverlap area is set so that the image data lastly read at the stop ofreading is read again in view of the mechanical positional accuracy. Forexample, when the mechanical positional accuracy is ±2 raster, readingthe image data is restarted from at least 2 rasters before.

And, if reading the image data is completed at step ST12, the scanningdevice 1 ends the process.

In this manner, if a read request of image data is issued, the scanningdevice 1 stores the read image data in a unit of raster U in the ringbuffer 12, as shown in FIG. 7. Also, the scanning device 1 stops readingthe image data at a position one raster before the position STP, whenthe capacity of empty area in the ring buffer 12 is less than thepredetermined amount, and records the specified mark data M after theraster image data R1 (hereinafter referred to as reference raster imagedata R1) lastly read at the time of stop. An area A up to one rasterbefore the position STP stores the image data read before stop, and anarea B one raster after the position STP stores the image data readafter restarting the reading.

Herein, the mark data M may be any data as far as it does not take thevalues of image data (other than the values of the image data). In caseof reading the monochromatic image data, it is possible to employ themark data of all “00” for one line, when there is no image data of all“00” for one line, or it is possible to employ the mark data of all “FF”for one line, when there is no image data of all “FF” for one line, orit is possible to employ the mark data of a repetition of “00” and “FF”for one line, when there is no image data of a repetition of “00” and“FF” for one line. Also, in case of reading the color image data, it ispossible to employ the mark data that is defined in such a format thatone red line is “00”, one green line is “AA” and one blue line is “FF”and that does not exist as the image data.

Referring to the flowcharts of FIGS. 5 and 6, a process performed by theimage writing unit 23 provided for the host computer 2 will be describedbelow.

The image writing unit 23 provided for the host computer 2, first ofall, reads the predetermined amount of image data from the buffer 21 inthe order from the initial position at step ST21, if the image data readby the scanning device 1 is sequentially stored in the buffer 21 by thedata transfer control unit 20.

Subsequently, the image writing unit 23 determines whether or not themark data M is contained in the read image data at step ST22. If themark data is not contained, the image writing unit 23 goes to step ST23,where the read image data is stored in the disk 22.

Subsequently, the image writing unit 23 adds the number of rasters forthe image data stored in the disk 22 this time to the accumulated numberof rasters at step ST24, whereby the number of rasters for the imagedata stored in the disk 22 is updated.

As described above, the scanning device 1 reads the image data to beoverlapped in performing the start and stop control. From this, the hostcomputer 2 requests and receives the image data having the number ofrasters above that for the intrinsic image data. Thus, the image writingunit 23 deletes the overlapped image data and stores the image data inthe disk 22 in accordance with a procedure as will be described later,and calculates the cumulative number of rasters for the image datastored in the disk 22 to determine whether or not the reading of theimage data is ended.

Subsequently, the image writing unit 23 determines whether or not thereading of the image data is ended from the cumulative number of rastersat step ST25. If the reading of the image data is ended, the imagewriting unit 23 ends the process. If the reading of the image data isnot ended, the image writing unit 23 returns to step ST21 to continuereading the image data from the buffer 21.

On the other hand, if the mark data M is contained in the image dataread from the buffer 21 at step ST22, the image writing unit 23 goes tostep ST26, where it is determined whether or not a simple processingmode is set up. The simple processing mode is the mode in which thesteps ST210 to 213 to be described later may be omitted when the imagedata near the mark data M is uniform.

In this determination processing, when the simple processing mode is setup, the image writing unit 23 proceeds to step ST27, where it isdetermined whether or not the image data near the mark data M is uniformimage data without any changes in the density or color. Thisdetermination is made by calculating the differential value betweenadjacent bits of the image data and checking whether or not all thedifferential values fall within the specified range. Herein, when themark data M is located at an end portion of the predetermined amount ofimage data read from the buffer 21, an adjacent portion of the imagedata is read from the buffer 21.

In the determination processing at step ST27, when the image data nearthe mark data M is uniform, the image writing unit 23 does not performthe steps ST210 to ST213 to be described later, but proceeds to stepST28 to discard the mark data M and the following raster image data withspecified number of rasters, and stores the remaining raster image datain the disk 22 at step ST29. Then the scanning device returns to stepST24.

That is, when the image data near the mark data M is uniform, the stepsST210 to ST213 to be described later are not performed, because theconcatenated part of image data (concatenated part between image dataread before temporary stop and image data read after restart) is notclear.

The reason for discarding the raster image data with a specified numberof rasters is that in restarting after temporary stop, the raster imagedata is read to be overlapped, whereby the raster image data by anoverlapped amount is discarded. However, this processing has nosignificant effect on the quality of read image data, and may beomitted.

On the other hand, when the simple processing mode at step ST26 is notset up and when the simple processing mode at step ST27 is set up butthe image data near the mark data M is not uniform, the image writingunit 23 goes to step ST210 to specify the raster image data (referenceraster image data R1 as shown in FIG. 7) immediately before the markdata M. This reference raster image data R1 is the raster image datalastly read at the time of temporarily stopping reading the image data.

Subsequently, the image writing unit 23 detects the raster image datawith the minimum sum of bit differences from the reference raster imagedata R1 for a detection object S of raster image data in an overlap areafollowing the mark data M (raster image data within a detection range Sas shown in FIG. 7) at step ST211. Thereby, the image writing unit 23detects the reference raster image data R2 contained in the image dataread by restarting the reading.

That is, the image writing unit 23 restarts reading the image data to beoverlapped, as shown in FIG. 8. In FIG. 8, an area STP indicates theimage data read before stop, and an area RST indicates the image dataread after restarting the reading. The reference raster image data R2 iscontained in the image data (of the area RST) read by restarting thereading. Thus, the image writing unit 23 detects the raster image dataso that the sum of bit differences from the reference raster image dataR1 (of the area STP) is minimized. Thereby, the (reference) raster imagedata R2 contained in the image data read by restarting the reading isdetected.

Subsequently, the image writing unit 23 discards the mark data M and thedetected raster image data R2 as well as the raster image data (i.e.,raster image data in area D) ranging from the mark data M to thedetected raster image data R2 as shown in FIG. 7 at step ST212. Theimage writing unit 23 stores the raster image data other than discardedin the disk 21 at step ST213. Then, the operation returns to step ST24.

In this manner, the image writing unit 23 provided for the host computer2 checks whether or not the mark data M is recorded for the image datastored in the buffer 21 as the processing object, if the image data readby the scanning device 1 is stored in the buffer 21. And when the markdata M is recorded, the image writing unit 23 detects the image datacorresponding to the raster image data immediately before the mark dataM (reference raster image data R2) from the raster image data in theoverlap area following the mark data M, correspondingly concatenates theimage data read before temporary stop and the image data read aftertemporary stop at high accuracy, and stores it in the disk 22.

Herein, supposing that the reference raster image data R1 is aconcatenated side and the raster image data next to the detected rasterimage data R2 is a concatenating side in the flowcharts of FIGS. 5 and6, the image data read before temporary stop and the image data readafter temporary stop are concatenated. However, alternatively, supposingthat the raster image data immediately before the reference raster imagedata R1 is a concatenated side and the detected raster image data R2 isa concatenating side, the image data read before temporary stop and theimage data read after temporary stop may be concatenated.

The following processing may be made as shown in FIG. 9. That is, theimage data in the overlap area is discarded, and the weighted averagefor the raster image data (Ln in the drawing) on the concatenated sideand the raster image data (Ln+1, Ln+2 in the drawing) on theconcatenating side is calculated in accordance with the degree ofseparation of raster.Ln+1=0.5×Ln+0.5×Ln+1Ln+2=0.25×Ln+1+0.75×Ln+2Ln+3=Ln+3And the raster image data on the concatenating side may be rewritten inaccordance with its calculation result.

Through this signal processing, the image data read before temporarystop and the image data after temporary stop can be concatenatedsmoothly.

FIG. 10 shows another embodiment of the present invention. In FIG. 10,start/stop control unit 16 provided for the scanning device 1 notifiesthe predetermined raster position information to the host computer 2without recording the mark data M. This predetermined raster positioninformation specifies the raster position of reference raster image dataR1 lastly read at the time of temporary stop, and may be the rasterposition information of reference raster image data R1 or the rasterposition information of the next raster image data, for example.

This notification is made at the time of temporary stop. However, thetime of notification is not limited to it, but may take place when atransfer request for the image data is received from the host computer 2after temporary stop.

On the other hand, the image writing unit 23 provided for the hostcomputer 2 is notified of the raster position information of the rasterreference image data to add the number of rasters for the raster imagedata received from the scanning device 1. Thereby, it is possible toknow which is the raster image data (reference raster image data R1)pointed to by the notified raster position information among the rasterimage data stored in the buffer 21.

Thus, the image writing unit 23 provided for the host computer 2performs the detection processing in accordance with this embodiment.Thereby, the image writing unit 23 detects the raster image data mostsimilar (R2) to the reference raster image data R1 pointed to by thenotified raster position information from the raster image data of theoverlap area S following the reference image data R1 pointed to by thenotified raster position information, and concatenates the image dataread before temporary stop and the image data read after temporary stopin accordance with the detected raster image data R2 and the referenceraster image data R1 pointed to by the raster position information, andstores the concatenated image data in the disk 22.

In this manner, it is possible to concatenate the image data read beforetemporary stop and the image data read after temporary stop at highaccuracy in accordance with the embodiment of FIG. 10.

In accordance with the embodiment of FIG. 10, the detection processingthat is employed when the image data near the reference raster imagedata R1 is uniform may be omitted, or the signal processing for theraster image data as shown in FIG. 9 may be performed.

This embodiment of the present invention comprising the scanning device1 and the host computer 2 has been described above.

FIG. 11 shows another embodiment of the present invention comprising thescanning device 1 alone. Herein, the same or like parts are denoted bythe same numerals as in FIG. 2.

Reference image latch unit 170 latches the raster image data (referenceraster image data R1) lastly read at the time of temporarily stoppingreading the image data in response to a latch instruction issued by thestart/stop control unit 16. Difference sum calculating unit 171calculates the sum Σ of bit difference between the reference rasterimage data R1 latched by the reference image raster unit 170 and theraster image data Rr read by restarting the reading after temporary stopwith a circuit structure as shown in FIG. 12. Inflection point detectingunit 172 controls the raster image data following the RST to suspendupdating the write pointer WP for the ring buffer 12, at the time ofrestarting reading the image data, as shown in FIG. 13. That is, thewrite pointer WP is not advanced in an area A. At the same time, theinflection point detecting unit 172 controls the write pointer WP to becanceled from a stopped state of update, when the bit difference sum Σcalculated by the difference sum calculating unit 171 transits fromdecrease to increase. That is, the write pointer WP is advanced in anarea B. The raster image data in case of transiting to increase is theraster image data next to the reference raster image data (R2) readagain.

Next, referring to a flowchart of FIG. 14, the operation of thisembodiment will be described below in detail. FIG. 14 shows oneembodiment of the flowchart of the operation performed by the scanningdevice 1 in accordance with this embodiment.

If there is issued a read request for the image data, the scanningdevice 1 first of all starts reading the image data at step ST31, andthen determines whether or not reading the image data is ended at stepST32.

If the reading of the image data is not ended, the scanning device 1goes to step ST33 to determine whether or not the capacity of empty areain the ring buffer 12 is less than a predetermined amount by monitoringthe write pointer WP and the read pointer RP for the read buffer 12. Inthis determination processing, if the capacity of empty area in the ringbuffer 12 is not less than the predetermined amount, the scanning device1 returns to step ST32 to continue reading the image data.

On the other hand, in this determination processing, if the capacity ofempty area in the ring buffer 12 is less than the predetermined amount,the scanning device 1 proceeds to step ST34 to stop the movement of thecarrier and stop reading the image data (update of the write pointer WPis automatically stopped once) and latch the lastly read referenceraster image data R1 in the reference image latch unit 170.

Subsequently, the scanning device 1 moves backward the carrier byspecified amount at step ST35, and then waits for the capacity of emptyarea in the ring buffer 12 to be a predetermined amount or more bymonitoring the write pointer WP and the read pointer RP at step ST36.

In the determination processing at step ST36, if the capacity of emptyarea in the ring buffer 12 is the predetermined amount or more, thescanning device 1 proceeds to step ST37 to move forward the carrier andrestart reading the image data from a position immediately beforestopping the reading. In this case, the inflection point detecting unit172 controls the write pointer WP for the ring buffer 12 not to beupdated, whereby the read raster image data is overwritten in the entryarea pointed to by the write pointer WP.

Subsequently, the scanning device 1 calculates the sum of bitdifferences between the raster image data to be processed and thereference raster image data R1 latched by the reference image latch unit170 to process the raster image data sequentially read after restartingthe reading, employing the difference sum calculating unit 171 at stepST38. The scanning device 1 determines whether or not the bit differencesum calculated by the difference sum calculating unit 171 continues todecrease, employing the inflection point detecting unit 172 at stepST39.

In this determination processing, if the bit difference sum calculatedby the difference sum calculating unit 171 continues to decrease, thescanning device 1 returns to step ST38. Thereby, the sum of bitdifferences between the raster image data to be processed next and thereference raster image data R1 can be calculated while update of thewrite pointer WP for the ring buffer 12 is suspended.

On the other hand, in this determination processing, if the bitdifference sum calculated by the difference sum calculating unit 171transits to increase, the scanning device 1 proceeds to step ST310 tocancel the suspended update of the write pointer WP, employing theinflection point detecting unit 172. Transiting to increase takes placeat the time of detecting that the raster image data next to the rasterimage data (R2) that is most similar to the reference raster image dataR1 latched by the reference image latch unit 170 is read. Thereby, thescanning device 1 stores the read raster image data in the ring buffer12 without overwriting, and returns to step ST32.

And the scanning device 1 ends the process if the reading of the imagedata is ended at step ST32.

In this manner, the scanning device 1 restarts reading the image data tooverlap the reference raster image data R1 lastly read at the time oftemporary stop in making the start/stop operation for reading the imagedata in accordance with a buffer capacity, discards the raster imagedata (image data in an area D) until the raster image data next to theraster image data R2 most similar to the reference raster image data R1lastly read is read and concatenates the image data before temporarystop and the image data after temporary stop. Thereby, it is possible toread the image data at high accuracy with a simple structure.

In the embodiment of FIG. 14, the raster image data matched with theraster image data lastly read is detected with a hardware by detectingthe rater image data next to the raster image data R2 matched with thereference raster image data R1 lastly read. However, besides, the rasterimage data R2 matched with the reference raster image data R1 lastlyread may be detected with software. In this case, the image data beforetemporary stop and the image data after temporary stop are concatenatedby employing a buffer prepared apart from the ring buffer 12.

In accordance with the embodiment of FIG. 14, the detection processingemployed when the image data near the reference raster image data R1 isuniform may be omitted, or the signal processing for the raster imagedata as shown in FIG. 9 may be performed.

Industrial Applicability

As above described, with the present invention, in performing thestart/stop operation for reading the image data in accordance with thecapacity of buffer, the scanning device restarts reading the image databy overlapping the raster image data lastly read at the time oftemporary stop, detects the raster image data matched with the rasterimage data lastly read, and concatenates the image data before temporarystop and the image data after temporary stop, whereby the image data canbe read at high accuracy with a simple structure.

1. A scanning device for reading image data, storing the image data in a unit of raster in a buffer and transferring the image data to a host computer, the scanning device comprising: means for temporarily stopping reading the image data when an empty capacity of the buffer becomes smaller than a predetermined amount; means for writing specified mark data in a next storage line of raster image data lastly read and stored in the buffer in response to the temporary stop; and means for restarting reading the image data by overlapping the raster image data lastly read when the empty capacity of the buffer becomes larger than the predetermined amount.
 2. A host computer connected to a scanning device for acquiring image data read by the scanning device in a unit of raster, the host computer comprising: means for determining whether or not acquired raster image data are specified mark data indicating a temporary stop of reading the image data; means for detecting raster image data most similar to the raster image data immediately before the mark data for a detection object of the raster image data having a predetermined number of rasters following the mark data within the acquired image data; and means for concatenating the image data read before the temporary stop and the image data read after the temporary stop on the basis of the detected raster image data and the raster image data immediately before the mark data.
 3. A host computer according to claim 2, further comprising: means for determining whether or not the neighborhood of the raster image data immediately before the mark data is uniform image data, wherein the image data is concatenated without detection, when the neighborhood of the raster image data immediately before the mark data is the uniform image data.
 4. A host computer according to claim 2, further comprising: means for calculating a weighted average of the raster image data to be concatenated, the raster image data to concatenate and the following raster image data having a predetermined number of rasters in accordance with a separation degree of raster, and for rewriting the raster image data to concatenate and the following raster image data of the predetermined number of rasters on the basis of its calculation result.
 5. A host computer according to claim 2, wherein the raster image data most similar to the raster image data immediately before the mark data has a minimum sum of bit differences from the raster image data immediately before the mark data.
 6. A scanning device for reading image data, storing the image data in a unit of raster in a buffer and transferring the image data to a host computer, the scanning device comprising: means for temporarily stopping reading the image data when an empty capacity of the buffer becomes smaller than a predetermined amount; means for notifying the host computer of information capable of designating a raster position of raster image data lastly read and stored in the buffer in response to the temporary stop; and means for restarting reading the image data by overlapping the raster image data lastly read when the empty capacity of the buffer becomes larger than the predetermined amount.
 7. A scanning device according to claim 6, wherein the information capable of designating the raster position of the raster image data lastly read is raster position information of the raster image data lastly read or the raster position information of the next raster image data.
 8. A host computer connected to a scanning device for acquiring image data read by the scanning device in a unit of raster, the host computer comprising: means for acquiring raster position information indicating a temporary stop position of reading the image data from the scanning device; means for designating raster image data lastly read at the time of the temporary stop indicated by the raster position information from the acquired image data; means for detecting the raster image data most similar to the raster image data lastly read for a detection object of the raster image data having a predetermined number of rasters following the raster image data lastly read within the acquired image data; and means for concatenating the image data read before the temporary stop and the image data read after the temporary stop on the basis of the detected raster image data and the raster image data lastly read.
 9. A host computer according to claim 8, further comprising: means for determining whether or not the neighborhood of the raster image data lastly read is uniform image data, wherein the image data is concatenated without detection, when the neighborhood of the raster image data lastly read is the uniform image data.
 10. A host computer according to claim 8, further comprising: means for calculating a weighted average of the raster image data to be concatenated, the raster image data to concatenate and the following raster image data having a predetermined number of rasters in accordance with a separation degree of raster, and for rewriting the raster image data to concatenate and the following raster image data having a predetermined number of rasters on the basis of its calculation result.
 11. A host computer according to claim 8, wherein the raster image data most similar to the raster image data lastly read has a minimum sum of bit differences from the raster image data lastly read.
 12. A scanning device for reading image data, storing the image data in a unit of raster in a buffer and transferring the image data to a host computer, the scanning device comprising: means for temporarily stopping reading the image data when an empty capacity of the buffer becomes smaller than a predetermined amount; means for restarting reading the image data by overlapping the raster image data lastly read at the time of the temporary stop when the empty capacity of the buffer becomes larger than the predetermined amount; means for detecting the raster image data most similar to the raster image data lastly read for a detection object of the raster image data having a predetermined number of rasters following the raster image data lastly read in response to the restart; and means for concatenating the image data read before the temporary stop and the image data read after the temporary stop in accordance with the detected raster image data and the raster image data lastly read.
 13. A scanning device according to claim 12, further comprising: means for determining whether or not the neighborhood of the raster image data lastly read is uniform image data, wherein the image data is concatenated without detection, when the neighborhood of the raster image data lastly read is the uniform image data.
 14. A scanning device according to claim 12, further comprising: means for calculating a weighted average of the raster image data to be concatenated, the raster image data to concatenate and the following raster image data having a predetermined number of rasters in accordance with a separation degree of raster, and for rewriting the raster image data to concatenate and the following raster image data having a predetermined number of rasters on the basis of its calculation result.
 15. A scanning device according to claim 12, wherein the raster image data most similar to the raster image data lastly read has a minimum sum of bit differences from the raster image data lastly read. 